<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>slice复制一定范围的数组</title>
		<script type="text/javascript">
			//var   /vɑr/
			//Array  /əˈreɪ/ 
			//length  /leŋkθ/
			//alert   /əˈlɜːrt/
			//slice   /slaɪs/
			
			var oldArray = [1,2,3,4,5,6,7,8,9];
			
			//slice() 方法可以基于当前数组获取指定区域元素 [start, end)
			var newArray = oldArray.slice(3,6);
			alert(oldArray);        //1,2,3,4,5,6,7,8,9
			alert(oldArray.length); //9
			alert(newArray);        //4,5,6
			alert(newArray.length); //3
			
		</script>
	</head>
	<body>
	</body>
</html>
